package com.wing.storage.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wing.product.model.response.ProductVO;
import com.wing.res.model.response.ProductCountInWarhouseVo;
import com.wing.storage.model.entity.ProductInventory;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 产品库存-Dao
 *
 * @author xiayang
 */
@Mapper
public interface ProductInventoryDao extends BaseMapper<ProductInventory> {

    /**
     * 产品库存列表
     *
     * @param page
     * @param params
     * @return
     */
    List<ProductInventory> pageList(@Param("page") Page<ProductInventory> page, @Param("params") Map<String, Object> params);

    /**
     * 产品库存详情
     *
     * @param id 产品库存ID
     * @return
     */
    ProductInventory get(Long id);

    /**
     * 查询物料的库存数量
     * @return
     */
    List<ProductCountInWarhouseVo> getProductCountInWarhouse();


    List<ProductVO> pageList2(@Param("params") Map<String, Object> params);

}
